﻿using System;
using System.Xml;
using System.Xml.Serialization;
using System.Drawing;
using System.Windows.Forms;
using rlTodayMakeSkin.Project.Attributes;

namespace rlTodayMakeSkin.Project.XmlElement
{
    public class rlCalendarHeader : rlAbstractCalendar
    {
        private string format;
        private string align;

        public rlCalendarHeader(XmlNode n, rlTodayProject p)
            : base(n, p)
        {
            if (listaAtt["format"] != null) format = listaAtt["format"].Value;
            if (listaAtt["alignment"] != null) align = listaAtt["alignment"].Value;
            strNome = "CalendarHeader";
        }

        public rlCalendarHeader(rlTodayProject p)
            : base(p)
        {
            strNome = "CalendarHeader";
        }

        /// <summary>
        /// for the serialization
        /// </summary>
        public rlCalendarHeader() { }

        /*************************
         PUBLIC MEMBERS
         ***********************/
        /// <summary>
        /// Gets, sets date format value
        /// </summary>
        [PropertyDescription("Date format", PropertyTypes.STRING)]
        [XmlAttribute("format")]
        public string Format
        {
            get { return format; }
            set { format = value; }
        }

        /// <summary>
        /// Gets, sets text alignment value
        /// </summary>
        [PropertyDescription("Text alignment", PropertyTypes.ALIGNMENT)]
        [XmlAttribute("alignment")]
        public string Align
        {
            get { return align; }
            set { align = value; }
        }

        public override void DrawElement(Graphics g)
        {
            DrawImage(g,"CalendarHeaderBig.png");
        }


        /*************************
         PROTECTED MEMBERS
         ***********************/

    }
}
